<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <!--{include file='comm/header.tpl'}-->
    <title>删除缓存</title>
</head>
<body>

<!--{include file='comm/naviBanner.tpl'}-->

<div class="container">

    <!--{include file='comm/menu.tpl'}-->

        <div class="comm_crub">
            <span class="now_crub">删除缓存</span>
        </div>

        <div class="comm_content">

            <input type="button" class="btn" value="删除首页缓存" onclick="clearCache.delConfirm( '首页缓存' , '<!--{$info.index}-->' )">

            <input type="button" class="btn" style="margin-left: 10px;" value="删除列表页缓存" onclick="clearCache.delConfirm( '列表页缓存' , '<!--{$info.list}-->' )">

            <input type="button" class="btn" style="margin-left: 10px;" value="删除详情页缓存" onclick="clearCache.delConfirm( '详情页缓存' , '<!--{$info.goods}-->' )">

            <input type="button" class="btn" style="margin-left: 10px;" value="删除文章详情页缓存" onclick="clearCache.delConfirm( '文章详情页缓存' , '<!--{$info.article}-->' )">

        </div>


</div>

<script>

    var clearCache = {

        delConfirm: function( title , dir ) {

            this.dir = dir;

            var msg = '您确认删除<font color="red">'+ title + '</font>吗？';

            E.confirm( msg , 'clearCache.delExe' );

        },

        delExe: function() {
            $.ajax({
                type: "POST",
                url: "/invokingAjax-backend/system/clearCache.ajax?operFlg=1",
                dataType: "JSON",
                data: {dir:this.dir},
                success: function( result_obj ) {
                    if (result_obj.code == 200) {

                        E.alert('删除成功', 2);

                    } else {
                        E.alert(result_obj.message);
                    }
                }
            });
        }

    };

</script>

</body>
</html>